package com.example.snashuitraverl.demos.api;

import com.yupi.yucongming.dev.client.YuCongMingClient;
import com.yupi.yucongming.dev.common.BaseResponse;
import com.yupi.yucongming.dev.model.DevChatRequest;
import com.yupi.yucongming.dev.model.DevChatResponse;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class openApi {
   @Resource
    private YuCongMingClient yuCongMingClient;
   public String doChat(String message){
      DevChatRequest devChatRequest = new DevChatRequest();
       devChatRequest.setModelId(1805797270059167745L);
       devChatRequest.setMessage(message);
       BaseResponse<DevChatResponse> devChatResponseBaseResponse = yuCongMingClient.doChat(devChatRequest);
     return  devChatResponseBaseResponse.getData().getContent();
   }

}
